
#include <BSystem>
#include <BEvent>
#include "member_BEvent.h"

using namespace BWE;

#define member						(*(member_BEvent*)_ptr)
#define member_allocate()			_ptr = new member_BEvent
#define member_release()			delete (member_BEvent*)_ptr

BEvent::BEvent(Event type)
{
	member_allocate();
	member.type = type;
}

BEvent::BEvent(const BEvent& other)
{
	member_allocate();
	member = *event_member(&other);
}
BEvent::~BEvent()
{
	member_release();
}

void BEvent::setType(Event type)
{
	member.type = type;
}
Event BEvent::type() const
{
	return member.type;
}

void BEvent::setTime(double time)
{
	member.time = time;
}
double BEvent::time() const
{
	return member.time;
}

void BEvent::setValue(const BValue& value)
{
	member.value = value;
}
const BValue& BEvent::value() const
{
	return member.value;
}

int BEvent::ckeyState(Key ckey)
{
	return BSystem::ckeyState(ckey);
}

